We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392565 - equ allows colon after the expression to calculate
Summary: equ allows colon after the expression to calculate
Status: OPEN
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.14.xx
Hardware: All All
: Medium trivial
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2019-04-11 08:17 PDT by E. C. Masloch
Modified: 2019-04-11 10:53 PDT (History)
4 users (show)

Obtained from: From OS distribution
Generated by: ---
Bug category:
Observed for: ---
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2019-04-11 08:17:36 PDT
This is just something unexpected that came up during some development. I'd expect this to cause an error, but it doesn't. Is this intended?


$ nasm -v
NASM version 2.14
$ cat test.asm 
[map all test.map]

	org 256
label1:
label2 equ label1
label3 equ label1:
label4: equ label1
label5: equ label1:
$ nasm test.asm -o test.bin -l test.lst
$ cat test.map

- NASM Map file ---------------------------------------------------------------

Source file:  test.asm
Output file:  test.bin

-- Program origin -------------------------------------------------------------

00000100

-- Sections (summary) ---------------------------------------------------------

Vstart            Start             Stop              Length    Class     Name
             100               100               100  00000000  progbits  .text

-- Sections (detailed) --------------------------------------------------------

---- Section .text ------------------------------------------------------------

class:     progbits
length:                   0
start:                  100
align:     not defined
follows:   not defined
vstart:                 100
valign:    not defined
vfollows:  not defined

-- Symbols --------------------------------------------------------------------

---- Section .text ------------------------------------------------------------

Real              Virtual           Name
             100               100  label1
             100               100  label2
             100               100  label3
             100               100  label4
             100               100  label5

$
Comment 1 H. Peter Anvin 2019-04-11 10:53:03 PDT
Not intentional, most likely a result of loose parsing of segment:offset expression suntan.